﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TorchView.Composition;
using System.Windows.Input;
using TorchView.Windows;
using TorchView.GameContent.Effects;

namespace TorchView.SharedStashEditor.ViewModels
{
    public class AddEffectViewModel : IAddEffectViewModel
    {
        public AddEffectViewModel(IDialogView<IAddEffectViewModel> view)
        {
            View = view;
            view.Model = this;
            CancelCommand = new DirectCommand(o => { View.DialogResult = false; View.Close(); });
            OKCommand = new DirectCommand(o => { View.DialogResult = true; View.Close(); });
        }

        public IDialogView<IAddEffectViewModel> View { get; private set; }
        public ICommand CancelCommand { get; private set; }
        public ICommand OKCommand { get; private set; }
        public IEnumerable<string> EffectCategories
        {
            get
            {
                return EffectList.DefaultList.Categories;
            }
        }

        public Effect SelectedEffect { get; set; }
    }
}
